c = s[0] |
s = input() |
print(c) |
print("Enter a word") |
1 | print("Enter a word") |
2 | s = input() |
3 | c = s[0] |
4 | print(c) |
print(t) |
s = input() |
print("Enter your salutation") |
t = s[:2] |
1 | print("Enter your salutation") |
2 | s = input() |
3 | t = s[:2] |
4 | print(t) |
print("Hello Companion") |
else: |
t = s[:2] |
print("Hello Sir") |
print("Hello Madame") |
elif t == "Ms": |
if t == "Mr": |
t = t.lower() |
print("Enter your salutation") |
s = input() |
    print("Hello Companion") |
else: |
t = s[:2] |
    print("Hello Sir") |
    print("Hello Madame") |
elif t == "Ms": |
if t == "Mr": |
t = t.lower() |
print("Enter your salutation") |
s = input() |
1 | print("Enter your salutation") |
2 | s = input() |
3 | t = s[:2] |
4 | t = t.lower() |
5 | if t == "Mr": |
6 |     print("Hello Sir") |
7 | elif t == "Ms": |
8 |     print("Hello Madame") |
9 | else: |
10 |     print("Hello Companion") |
11 |      |
i = len(s) - 1 |
print("Enter a word and I will give you the last letter") |
print(c) |
s = input() |
c = s[i] |
1 | print("Enter a word and I will give you the last letter") |
2 | s = input() |
3 | i = len(s) - 1 |
4 | c = s[i] |
5 | print(c) |
c1 = s[0] |
s = input() |
i = len(s) - 1 |
print("Enter a word and I will give you first letter + last letter") |
print(c1 + c2) |
c2 = s[i] |
1 | print("Enter a word and I will give you first letter + last letter") |
2 | s = input() |
3 | c1 = s[0] |
4 | i = len(s) - 1 |
5 | c2 = s[i] |
6 | print(c1 + c2) |
i1 = s[0] |
s = input() |
print("Enter a two digit number") |
i2 = int(i2) |
i1 = int(i1) |
i2 = s[1] |
print(i3) |
i3 = i1 * i2 |
1 | print("Enter a two digit number") |
2 | s = input() |
3 | i1 = s[0] |
4 | i1 = int(i1) |
5 | i2 = s[1] |
6 | i2 = int(i2) |
7 | i3 = i1 * i2 |
8 | print(i3) |
i1 = s[0] |
if l != 2: |
print(i3) |
i2 = int(i2) |
print("Not a two digit number") |
i3 = i1 * i2 |
print("Enter a two digit number") |
s = input() |
l = len(s) |
i1 = int(i1) |
exit() |
i2 = s[1] |
i1 = s[0] |
if l != 2: |
print(i3) |
i2 = int(i2) |
    print("Not a two digit number") |
i3 = i1 * i2 |
print("Enter a two digit number") |
s = input() |
l = len(s) |
i1 = int(i1) |
    exit() |
i2 = s[1] |
1 | print("Enter a two digit number") |
2 | s = input() |
3 | l = len(s) |
4 | if l != 2: |
5 |     print("Not a two digit number") |
6 |     exit() |
7 | i1 = s[0] |
8 | i1 = int(i1) |
9 | i2 = s[1] |
10 | i2 = int(i2) |
11 | i3 = i1 * i2 |
12 | print(i3) |
c1 = int(c1) |
c1 = i[0] |
c2 = int(c2) |
c2 = str(c2) |
c1 = c1 + 2 |
c2 = c2 - 2 |
c2 = i[1] |
print("Enter a two digit pin") |
i = input() |
print(c1+c2) |
c1 = str(c1) |
1 | print("Enter a two digit pin") |
2 | i = input() |
3 | c1 = i[0] |
4 | c1 = int(c1) |
5 | c1 = c1 + 2 |
6 | c1 = str(c1) |
7 | |
8 | c2 = i[1] |
9 | c2 = int(c2) |
10 | c2 = c2 - 2 |
11 | c2 = str(c2) |
12 | print(c1+c2) |
l = l // 2 |
print(c) |
l = len(s) |
r = l % 2 |
c = s[l] |
print("Enter a word and I will print the middle character") |
s = input() |
if r == 0: |
print("Error") |
else: |
    l = l // 2 |
    print(c) |
l = len(s) |
r = l % 2 |
    c = s[l] |
print("Enter a word and I will print the middle character") |
s = input() |
if r == 0: |
    print("Error") |
else: |
1 | print("Enter a word and I will print the middle character") |
2 | s = input() |
3 | l = len(s) |
4 | r = l % 2 |
5 | if r == 0: |
6 |     print("Error") |
7 | else: |
8 |     l = l // 2 |
9 |     c = s[l] |
10 |     print(c) |
i3 = i1 + i2 |
i2 = i[2:] |
print("Enter a four digit number") |
i2 = int(i2) |
i2 = str(i2) |
i1 = str(i1) |
i1 = int(i1) |
print(i1 + " + " + i2 + " = " + i3) |
i = input() |
i3 = str(i3) |
i1 = i[:2] |
1 | print("Enter a four digit number") |
2 | i = input() |
3 | i1 = i[:2] |
4 | i1 = int(i1) |
5 | i2 = i[2:] |
6 | i2 = int(i2) |
7 | i3 = i1 + i2 |
8 | i1 = str(i1) |
9 | i2 = str(i2) |
10 | i3 = str(i3) |
11 | print(i1 + " + " + i2 + " = " + i3) |
s = i[:l] |
i = input() |
l = len(i) |
l = l // 2 |
print(s) |
print("Enter a word and I will print the first half") |
1 | print("Enter a word and I will print the first half") |
2 | i = input() |
3 | l = len(i) |
4 | l = l // 2 |
5 | s = i[:l] |
6 | print(s) |
lch = i[idx] |
print("Enter a word and I will swap the first and last letter around") |
fch = i[0] |
idx = len(i) - 1 |
print(lch+mid+fch) |
mid = i[1:idx] |
i = input() |
1 | print("Enter a word and I will swap the first and last letter around") |
2 | i = input() |
3 | fch = i[0] |
4 | idx = len(i) - 1 |
5 | lch = i[idx] |
6 | mid = i[1:idx] |
7 | print(lch+mid+fch) |
end = i[l:] |
print(False) |
print(True) |
l = len(i) - 5 |
else: |
i = input() |
print("Enter a county ending in shire") |
if end == "shire": |
end = i[l:] |
    print(False) |
    print(True) |
l = len(i) - 5 |
else: |
i = input() |
print("Enter a county ending in shire") |
if end == "shire": |
1 | print("Enter a county ending in shire") |
2 | i = input() |
3 | l = len(i) - 5 |
4 | end = i[l:] |
5 | if end == "shire": |
6 |     print(True) |
7 | else: |
8 |     print(False) |
9 |      |
print("No match") |
if first == s: |
s = input() |
print("Enter a word and a starting word") |
else: |
first = w[:l] |
w = input() |
l = len(s) |
print("Match") |
    print("No match") |
if first == s: |
s = input() |
print("Enter a word and a starting word") |
else: |
first = w[:l] |
w = input() |
l = len(s) |
    print("Match") |
1 | print("Enter a word and a starting word") |
2 | w = input() |
3 | s = input() |
4 | l = len(s) |
5 | first = w[:l] |
6 | if first == s: |
7 |     print("Match") |
8 | else: |
9 |     print("No match") |